package com.jackson.springaop.controller;

/*
 * Author: JacksonCoder
 * FileName: UserController
 * Version: 1.0.0
 * Date: 2025/6/25
 */

import com.jackson.springaop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/get")
    public int getUser() {
        return userService.getUserById();
    }

    @GetMapping("/name")
    public String getUserName() {
        return userService.selectUserName();
    }

}
